Use fetch instead of got in notion-client#312
Use fetch instead of got in notion-client#312remorses wants to merge 2 commits intoNotionX:masterfrom
notion-client#312Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
notion-clientnotion-client
|
Yes, even I use this cloudflare workers and i had to add a patch everytime to replace got with fetch. |
|
Really great PR @remorses. Much appreciated 🙏 My main hesitancy here is that the notion API can be pretty flaky at times, and Maybe we could allow for the user to pass in their own I'd still like |
|
What if we move the retry logic inside the fetch method? The user could then pass something like |
|
I've finally had a chance to revisit this while trying to get The main issue I'm running into is that including Either way, I'd love to support this use case for |
|
Resolved in #394 |
Description
Using fetch from undici or the native fetch implementation, this makes it possible to use notion-client in
cloudflare workersor other environments other than nodeGiven that this is a breaking change (renamed
gotOptionstofetchOptions) it could need a major version bump, tell me if you want me to change the version of the packagesFix #160